include(cc_binary)
include(cc_library)
include(cc_test)


cc_library(
  NAME
    kv_cache
  HDRS
    embedding_allocator.h
    $<$<BOOL:${USE_NPU}>:hccl_kv_cache_transfer.h>
    kv_cache.h
    kv_cache_event.h
    kv_cache_transfer.h
    $<$<BOOL:${USE_NPU}>:llm_data_dist_transfer.h>
    $<$<BOOL:${USE_NPU}>:spec_kv_cache_transfer.h>
    kv_cache_store.h
  SRCS
    embedding_allocator.cpp
    $<$<BOOL:${USE_NPU}>:hccl_kv_cache_transfer.cpp>
    kv_cache.cpp
    kv_cache_transfer.cpp
    $<$<BOOL:${USE_NPU}>:llm_data_dist_transfer.cpp>
    $<$<BOOL:${USE_NPU}>:spec_kv_cache_transfer.cpp>
    kv_cache_store.cpp
  DEPS
    :common
    $<$<BOOL:${USE_NPU}>:graph>
    glog::glog
    $<$<BOOL:${USE_NPU}>:hccl_transfer>
    torch
    $<$<BOOL:${USE_NPU}>:torch_npu>
    mooncake_store
    :xtensor
    $<$<BOOL:${USE_NPU}>:platform_npu>
)
